package com.hnhs.service;

import com.hnhs.mapper.CategoryMapper;
import com.hnhs.mapper.VideosMapper;
import com.hnhs.model.Category;
import com.hnhs.model.CategoryQuery;
import com.hnhs.model.Videos;
import com.hnhs.model.VideosQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VideosService {
    @Autowired
    private VideosMapper mapper;

    public List<Videos> select(VideosQuery query){
        return mapper.select(query);
    }

   public int insert(Videos videos){
        //交给你们作 里面加个判断
        return mapper.insert(videos);
    }
   public  int update(Videos videos){
        return mapper.update(videos);
    }
    //删除 采用软删除 就是更改status
    public int delete(Integer id){

        return mapper.delete(id);
    }
}
